//
//  CellShop1.m
//  Teacher
//
//  Created by cong on 15/11/15.
//  Copyright © 2015年 liangdianxiong. All rights reserved.
//

#import "CellShop1.h"

@implementation CellShop1

- (void)awakeFromNib {

}
-(void)setParams:(id)params{
    [super setParams:params];
    if (params) {
        
         CGFloat ww = (SCREEN_WIDTH-10-22)/2;
        [_cvShop clearAllData];
        if ([params[@"cell"] isEqualToString:@"CCellShop1"]) {
            for (int i=0; i<9; i++) {
                
                

                 _cvShop.itemSize = CGSizeZero;
                
                [_cvShop addNibWithEntity:@{} andCellName:params[@"cell"] andSection:0];
            }
            
            _consH.constant = 3 * 29 + 17;
        }else if([params[@"cell"] isEqualToString:@"CCellShop"]){
            for (int i=0; i<4; i++) {
                
                 _cvShop.itemSize = CGSizeZero;
                [_cvShop addNibWithEntity:@{} andCellName:params[@"cell"] andSection:0];
            }
        _consH.constant = 325;
        }else if([params[@"cell"] isEqualToString:@"CCellShop4"]){
            
            _cvShop.itemSize = CGSizeMake(ww, 192);
//             _cvShop.itemSize = CGSizeZero;
            for (int i=0; i<4; i++) {
                [_cvShop addNibWithEntity:@{} andCellName:params[@"cell"] andSection:0];
            }
            _consH.constant = 386;
        }
        
        
    }

}


@end
